package com.foodservice.service.impl;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.foodservice.bean.Food;
import com.foodservice.bean.FoodType;
import com.foodservice.bean.FoodTypeCatelog;
import com.foodservice.dao.FoodDao;
import com.foodservice.dao.FoodTypeDao;
import com.foodservice.service.Service4Customer;

public class Service4CustomerImpl implements Service4Customer{

	private FoodDao foodDao = null;
	private FoodTypeDao foodTypeDao = null;
	
	

	public FoodTypeDao getFoodTypeDao() {
		return foodTypeDao;
	}

	public void setFoodTypeDao(FoodTypeDao foodTypeDao) {
		this.foodTypeDao = foodTypeDao;
	}

	public FoodDao getFoodDao() {
		return foodDao;
	}

	public void setFoodDao(FoodDao foodDao) {
		this.foodDao = foodDao;
	}
	@Transactional
	public List<Food> queryAllFood() {
		// TODO Auto-generated method stub
		return foodDao.queryAllFood();
	}
	@Transactional
	public List<Food> queryFoodByType(FoodType foodType){
		return foodDao.queryFoodByType(foodType);
	}
	@Transactional
	public List<FoodType> queryFoodTypes() {
		// TODO Auto-generated method stub
		return foodTypeDao.queryAllFoodType();
	}
	@Transactional
	public FoodType getFoodType(String name) {
		// TODO Auto-generated method stub
		return foodTypeDao.getFoodType(name);
	}

	@Transactional
	public List<FoodTypeCatelog> queryAllCatelogs() {
		// TODO Auto-generated method stub
		return foodTypeDao.queryAllCateLog();
	}
	
	
}
